-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return settings prop as object in the REST API #2560
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2560 +/- ##
=========================================
Coverage 65.0% 65.0%
- Complexity 4588 4591 +3
=========================================
Files 475 475
Lines 17900 17907 +7
=========================================
+ Hits 11640 11646 +6
- Misses 6260 6261 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks, @puntope, for fixing this! However, Before:After:I’ll go ahead and merge this PR for you. |
Changes proposed in this Pull Request:
Ref: p1724235667349019/1722414955.111429-slack-C02BB3F30TG
Reverts #2519
This PR fixes an error introduced in #2519
At first, I understood that it was expected to get all empty props as an empty object. However, what was expected was only to get the Settings prop as an object. Rest of the props should be as before.
This PR reverts #2519 and makes only settings to be returned as an object.
Screenshots:
Detailed test instructions:
wp-json/wc/v3/products?gla_syncable=1
attributes
field is shown as an array (when is empty and when is filled)gla_attributes
field is shown as an object (when is empty and when is filled)Requestwp-json/wc/v3/settings/general?gla_syncable=1
settings
field is shown as an object (when is empty and when is filled)v3/shipping/zones/YOUR_SHIPPING_ZONE/methods?gla_syncable=1
which includes a Flat Rate method.Before:
After
Additional details:
Changelog entry